package Experiment1;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

import java.util.ArrayList;

/**
 * Created by zhangyunqi on 2017/9/26.
 */
class LinkedListDemoTest1 {
    ArrayList list = new ArrayList ();
    @Test
    void isEmpty() {
        assertEquals ( true, list.isEmpty () );
        list.add ( "07shiyan4" );
        assertEquals ( false, list.isEmpty () );
        list.remove ( "07shiyan4" );
        assertEquals ( true, list.isEmpty () );
        list.add ( "07shiyan4" );
    }
    @Test
    void add() {
        list.add ( "20162307shiyan4" );
        assertEquals ( "20162307shiyan4", list.get (0) );
    }

    @Test
    void contains() {
        list.add ( 123456);

        assertEquals ( true, list.contains ( 123456) );
    }

}